﻿using RndMaterialDisposalService.Models;
using RndMaterialDisposalService.Models.Entitys;
using RndMaterialDisposalService.Models.RequestModel;
using NPOI.POIFS.Crypt.Dsig;

namespace RndMaterialDisposalService.Services.Interface
{
    /// <summary>
    /// 
    /// </summary>
    public interface IPortalCommonService
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="keyWord"></param>
        /// <param name="sortField"></param>
        /// <param name="SortDir"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(List<ToDoModel> Data, int TotalCount)> GetTodoList(string userId, string? keyWord, string sortField, string SortDir, int pageIndex = 1, int pageSize = 10);
       
        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="keyWord"></param>
        /// <param name="sortField"></param>
        /// <param name="SortDir"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(List<VToDoneDto> Data, int TotalCount)> GetDoneList(string userId, string? keyWord, string sortField, string SortDir, int pageIndex = 1, int pageSize = 10);
        
        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="keyWord"></param>
        /// <param name="sortField"></param>
        /// <param name="SortDir"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(List<VToReadDto> Data, int TotalCount)> GetToReadList(string userId, string? keyWord, string sortField, string SortDir, int pageIndex = 1, int pageSize = 10);
        
        /// <summary>
        /// 
        /// </summary>
        /// <param name="procInstID"></param>
        /// <returns></returns>
        Task<List<WorkItemUser>> GetWorkListItemUserByProcInstID(int procInstID);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="procSetId"></param>
        /// <param name="folio"></param>
        /// <param name="originator"></param>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(List<ProcInst> Data,int TotalCount)> GetProcInst(int procSetId, string folio, string originator, DateTime? startDate, DateTime? endDate, int pageIndex = 1, int pageSize = 10);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<(int todoCount, int toReadCount)> GetTodoToReadCount(string userId);

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        Task<List<StandardDictionaryConfigurationModel>> MobileProcesslist();

        /// <summary>
        /// 获取当前用户所有待办
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="keyWord"></param>
        /// <param name="sortField"></param>
        /// <param name="SortDir"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<BatchApprovalToDoModel> GetPCTodoList(string userId, string? keyWord, string sortField = "ArrivalDate", string SortDir = "desc", int pageIndex = 1, int pageSize = 10);

        /// <summary>
        /// 根据批量流程实例号查询实例
        /// </summary>
        /// <param name="procInstIdList"></param>
        /// <returns></returns>
        Task<List<ApplicationDataModel>> GetBatchProcessInstance(List<string> procInstIdList);

        /// <summary>
        ///  
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="moduleIds"></param>
        /// <param name="keyword"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(List<ToDoModel> Data, int TotalCount)> GetEDPWorkItemList(string userId,  string keyword, int pageIndex, int pageSize);

        /// <summary>
        ///  
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="moduleIds"></param>
        /// <param name="keyword"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(List<VToDoneDto> Data, int TotalCount)> GetEDPWorkDoneList(string userId, string keyword, int pageIndex, int pageSize);

        /// <summary>
        ///  
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="moduleIds"></param>
        /// <param name="keyword"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(List<VToReadDto> Data, int TotalCount)> GetEDPWorkReadList(string userId,  string keyword, int pageIndex, int pageSize);
    }
}
